home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Development / PowerD / powerd / source / lib / powerd_lib.lha / PowerD_PPC / AllocVecPooledPPC.ass < prev    next >
Text File  |  2001-07-09  |  517b  |  33 lines

  1.  
  2. # AllocVecPooledPPC(pool:r3:PTR,size:r4:LONG)(PTR)
  3.  
  4.     .text
  5.     .global    _AllocVecPooledPPC
  6.  
  7. _AllocVecPooledPPC:
  8.     mflr    r0
  9.     stw    r0,8(r1)
  10.     stwu    r1,-32(r1)
  11.     stw    r4,24(r1)
  12.     mr    r5,r4
  13.     addi    r5,r5,4        # add the SIZEOF_LONG
  14.     mr    r4,r3
  15.     lwz    r3,_PowerPCBase(r2)
  16.     lwz    r0,-828+2(r3)
  17.     mtlr    r0
  18.     blrl
  19.  
  20.     lwz    r4,24(r1)
  21.     stw    r4,0(r3)
  22.     addi    r3,r3,4        # store the size and return the position
  23.  
  24.     addi    r1,r1,32
  25.     lwz    r0,8(r1)
  26.     mtlr    r0
  27.     blr
  28.  
  29.     .type    _AllocVecPooledPPC,@function
  30.     .size    _AllocVecPooledPPC,$-_AllocVecPooledPPC
  31.  
  32.     .extern    _PowerPCBase
  33.